public class Point {
    double x;
    double y;

    public void setX(double x) {
        this.x = x;
    }

    public void setY(double y) {
        this.y = y;
    }

    public Point () {

    }
    public Point PointByxy(double x,double y) {
        //表示直角坐标系的点
        Point p = new Point();
        p.setX(x);
        p.setY(y);
        return p;
    }

    public Point PointByra(double r,double a) {
        //表示极坐标系的点
        Point p = new Point();
        p.setX(r*Math.cos(a));
        p.setY(r*Math.sin(a));
        return p;
    }
}
